package com.four.service.impl;

import com.four.dao.OrdersMapper;
import com.four.pojo.Orders;
import com.four.pojo.Product;
import com.four.service.IOrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 于志豪
 * @create 2021-10-24 17:23
 */

@Service("ordersServiceImpl")
public class OrdersServiceImpl implements IOrdersService {
    @Autowired
    @Qualifier("ordersMapper")
    private OrdersMapper mapper;

    @Override
    public List<Orders> findAll(Orders orders) {
        System.out.println("aa");
        System.out.println(mapper.findAll(orders));
        return mapper.findAll(orders);
    }

    @Override
    public Orders findById(int id) {
        return mapper.findById(id);
    }

    @Override
    public List<Orders> findAllJs() {
        return mapper.findAllJs();
    }

    @Override
    public int addOrder(Orders orders) {
        return mapper.addOrder(orders);
    }

    @Override
    public int deleteOid(int id) {
        return mapper.deleteOid(id);
    }


}
